package com.atom.common.delegate;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.atom.common.dao.AvensCommonDao;

@Repository
public class DelegateLogDao extends AvensCommonDao<DelegateLog> {

  public List<DelegateLog> findByDelegateInfoId(String id) {
    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put("delegateInfoId", id);
    properties.put("isRollBack", 0);
    properties.put("isComplete", 0);
    return super.findByProperties(properties);
  }

  public List<DelegateLog> findByTaskId(String taskId) {
    return super.findByProperty("taskId", taskId);
  }

}
